﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/activity.Master" AutoEventWireup="true" CodeBehind="manageactivity.aspx.cs" Inherits="pcsse.activity.manageactivity" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="hoder_sidebar" runat="server">
    <p>
    </p>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="hoder_maincontent" runat="server">
    <div class="p_title">
活动审批
</div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    
    <asp:GridView ID="mainGv" runat="server" AllowPaging="True" AllowSorting="True" 
    AutoGenerateColumns="False" DataSourceID="mGvOds" DataKeyNames="ID" onprerender="mainGv_PreRender" 
        onrowdatabound="mainGv_RowDataBound">
    <Columns>
        <asp:CommandField ShowSelectButton="True" />
        <asp:BoundField DataField="FULLNAME" HeaderText="所属支部" ReadOnly="True" 
            SortExpression="FULLNAME">
            <ItemStyle Width="150px" />
        </asp:BoundField>
        <asp:BoundField DataField="PRICIPLE_NAME" HeaderText="负责人姓名" 
            SortExpression="PRICIPLE_NAME">
            <ItemStyle Width="80px" />
        </asp:BoundField>
        <asp:BoundField DataField="NAME" HeaderText="活动名称" SortExpression="NAME">
            <ItemStyle Width="120px" />
        </asp:BoundField>
        <asp:BoundField DataField="BUDGET" HeaderText="活动预算" SortExpression="BUDGET">
            <ItemStyle Width="80px" />
        </asp:BoundField>
        <asp:BoundField DataField="SUGGESTION" HeaderText="学院意见" 
            SortExpression="SUGGESTION">
            <ItemStyle Width="120px" />
        </asp:BoundField>
        <asp:TemplateField HeaderText="状态" SortExpression="STATE">
            <EditItemTemplate>
                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("STATE") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="stateLb" runat="server" Text='<%# Bind("STATE") %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle Width="60px" />
        </asp:TemplateField>
    </Columns>
</asp:GridView>
    <asp:DetailsView ID="activityDv" runat="server" AutoGenerateRows="False" 
        DataSourceID="mDvOds" DefaultMode="Edit" Height="50px" Width="400px" 
        DataKeyNames="ID" onitemupdated="activityDv_ItemUpdated" 
        onitemupdating="activityDv_ItemUpdating">
        <FieldHeaderStyle Width="100px" />
        <Fields>
            <asp:TemplateField HeaderText="支部名" SortExpression="FULLNAME">
                <EditItemTemplate>
                    <asp:Label ID="Label18" runat="server" Text='<%# Eval("FULLNAME") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("FULLNAME") %>'></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("FULLNAME") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="负责人" SortExpression="PRINCIPLE">
                <EditItemTemplate>
                    <asp:Label ID="Label13" runat="server" Text='<%# Eval("PRINCIPLE") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Height="20px" 
                        Text='<%# Bind("PRINCIPLE") %>' Width="80px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label8" runat="server" Text='<%# Bind("PRINCIPLE") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="联系方式" SortExpression="TELEPHONE">
                <EditItemTemplate>
                    <asp:Label ID="Label14" runat="server" Text='<%# Eval("TELEPHONE") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox7" runat="server" Height="20px" 
                        Text='<%# Bind("TELEPHONE") %>' Width="120px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label9" runat="server" Text='<%# Bind("TELEPHONE") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="电子邮件" SortExpression="EMAIL">
                <EditItemTemplate>
                    <asp:Label ID="Label15" runat="server" Text='<%# Eval("EMAIL") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox13" runat="server" Height="20px" 
                        Text='<%# Bind("EMAIL") %>' Width="120px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label10" runat="server" Text='<%# Bind("EMAIL") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="活动名称" SortExpression="NAME">
                <EditItemTemplate>
                    <asp:Label ID="Label16" runat="server" Text='<%# Eval("NAME") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox14" runat="server" Height="20px" 
                        Text='<%# Bind("NAME") %>' Width="150px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label11" runat="server" Text='<%# Bind("NAME") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="活动时间" SortExpression="TIME">
                <EditItemTemplate>
                    <asp:Label ID="Label19" runat="server" Text='<%# Eval("TIME", "{0:d}") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("TIME", "{0:d}") %>'></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label13" runat="server" Text='<%# Bind("TIME", "{0:d}") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="活动地点" SortExpression="PLACE">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Eval("PLACE") %>' 
                        Height="40px" ReadOnly="True" TextMode="MultiLine" Width="180px"></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox16" runat="server" Height="40px" 
                        Text='<%# Bind("PLACE") %>' TextMode="MultiLine" Width="180px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("PLACE") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="活动意义" SortExpression="SIGNIFICANCE">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Eval("SIGNIFICANCE") %>' 
                        Height="40px" ReadOnly="True" TextMode="MultiLine" Width="180px"></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox17" runat="server" Height="40px" 
                        Text='<%# Bind("SIGNIFICANCE") %>' TextMode="MultiLine" Width="180px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("SIGNIFICANCE") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="活动内容" SortExpression="CONTENT">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox6" runat="server" Text='<%# Eval("CONTENT") %>' 
                        Height="80px" ReadOnly="True" TextMode="MultiLine" Width="180px"></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox18" runat="server" Height="80px" 
                        Text='<%# Bind("CONTENT") %>' TextMode="MultiLine" Width="180px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label6" runat="server" Text='<%# Bind("CONTENT") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="内容附件" SortExpression="ATTACHFILE">
                <EditItemTemplate>
                    <asp:HyperLink ID="HyperLink5" runat="server" Text='<%# Eval("ATTACHFILE") %>' NavigateUrl='<%# "~/activity/UpAttach/" + Eval("ATTACHFILE") %>'></asp:HyperLink>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="upFileTb" runat="server" Height="20px" ReadOnly="True" 
                        Text='<%# Bind("ATTACHFILE") %>' Width="150px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("ATTACHFILE") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="预计成果" SortExpression="GOAL">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox20" runat="server" Text='<%# Eval("GOAL") %>' 
                        Height="40px" ReadOnly="True" TextMode="MultiLine" Width="180px"></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox21" runat="server" Height="40px" 
                        Text='<%# Bind("GOAL") %>' TextMode="MultiLine" Width="180px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label7" runat="server" Text='<%# Bind("GOAL") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="经费预算" SortExpression="BUDGET">
                <EditItemTemplate>
                    <asp:Label ID="Label17" runat="server" Text='<%# Eval("BUDGET", "{0:C}") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox22" runat="server" Height="20px" 
                        Text='<%# Bind("BUDGET") %>' Width="80px"></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label12" runat="server" Text='<%# Bind("BUDGET") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="学院意见" SortExpression="SUGGESTION">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Height="60px" 
                        Text='<%# Bind("SUGGESTION") %>' TextMode="MultiLine" Width="180px"></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("SUGGESTION") %>'></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label14" runat="server" Text='<%# Bind("SUGGESTION") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="状态" SortExpression="STATE">
                <EditItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" Height="20px" 
                        SelectedValue='<%# Bind("STATE") %>' Width="80px">
                        <asp:ListItem Value="0">未审核</asp:ListItem>
                        <asp:ListItem Value="1">驳回</asp:ListItem>
                        <asp:ListItem Value="2">通过</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("STATE") %>'></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label15" runat="server" Text='<%# Bind("STATE") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowInsertButton="True" ShowEditButton="True" />
        </Fields>
    </asp:DetailsView>

    <asp:Label ID="errLb" runat="server" Text=""></asp:Label>

<asp:ObjectDataSource ID="mDvOds" runat="server" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByID" 
    TypeName="ActivityTableAdapters.T_ACTIVITYTableAdapter" 
        UpdateMethod="UpdateByCollege">
    <UpdateParameters>
        <asp:Parameter Name="SUGGESTION" Type="String" />
        <asp:Parameter Name="STATE" Type="Int32" />
        <asp:Parameter Name="Original_ID" Type="Int32" />
    </UpdateParameters>
    <SelectParameters>
        <asp:ControlParameter ControlID="mainGv" Name="Original_ID" 
            PropertyName="SelectedValue" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="mGvOds" runat="server" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
    TypeName="ActivityTableAdapters.T_ACTIVITYTableAdapter">
</asp:ObjectDataSource>
</ContentTemplate>
    </asp:UpdatePanel>
    
</asp:Content>
